package com.itheima.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.itheima.Enum.ProjectStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author guanhuaer
 * @since 2024-09-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Preject对象", description="")
public class Preject implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    @ApiModelProperty(value = "项目名称")
    private String title;

    @ApiModelProperty(value = "项目介绍")
    private String content;

    @ApiModelProperty(value = "项目类型")
    private String type;

    @ApiModelProperty(value = "项目发起人")
    private String username;
    @ApiModelProperty(value = "项目发起人id")
    private Integer userId;

    @ApiModelProperty(value = "发起时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "项目成员")
    private String menber;

    @ApiModelProperty(value = "项目状态 0待审核，1审核通过，2，审核不通过，3驳回")
    private Integer status;

    @ApiModelProperty(value = "项目附件")
    private String file;

    @ApiModelProperty(value = "项目图片")
    private String projectImg;

    @ApiModelProperty(value = "是否支持下载，0允许，1拒绝")
    private Long download;
    @ApiModelProperty(value = "文件列表")
    private String fileList;
    private String statuss;
    private String protype;

    @ApiModelProperty(value = "是否提交审核，0未提交，1已提交")
    private Integer isSubmit;

    @ApiModelProperty(value = "指导教师")
    private String instructor;

    @ApiModelProperty(value = "教师id")
    private Integer teacherId;
    @ApiModelProperty(value = "地区")
    private String address;

    public String getStatuss() {
        return ProjectStatusEnum.getStatus(status).getDesc();
    }
}
